home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.4 Applications 1997 August / SGI IRIX 6.4 Applications 1997 August.iso / dist / mmailp.idb / usr / lib / Zmail / bin / sndAppleSingle.z / sndAppleSingle
Encoding:
Text File  |  1997-01-22  |  972 b   |  41 lines

  1. #!/bin/sh
  2. #
  3. # Very simple shellscript to support sending Macintosh files
  4. # which are stored in a UNIX filesystem by the CAP AUFS program.
  5. #
  6. # To be able to use this script without modifications, you must
  7. # first have the CAP package installed so you can mount the
  8. # UNIX filesystem from the Macintosh. Second, you must have the
  9. # program cvt2apple (which you can find in the contrib directory
  10. # of the CAP distribution) which converts between CAP format
  11. # to AppleSingle format.
  12. #
  13. # Written by Patrik Faltstrom, paf@nada.kth.se, may 1993
  14. #
  15.  
  16. FILENAME=$1
  17.  
  18. #
  19. # If $AFPDIR environment variable is set, all Macintosh filenames
  20. # is based on that directory.
  21. #
  22.  
  23. echo -n "Please give a name of the Macintosh file: "
  24. read NAME
  25.  
  26. if [ "x$NAME" = "x" ]; then
  27.    echo "No name given, exiting"
  28.    exit 1
  29. fi
  30.  
  31. echo $NAME | grep '^/' > /dev/null
  32. if [ $? = 1 ]; then
  33.   NAME=$AFPDIR/$NAME
  34. fi
  35.  
  36. cvt2apple $NAME $FILENAME
  37. echo "Included file $NAME in this mail as an AppleSingle file"
  38. exit 0
  39.  
  40.  
  41.